<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core"
                xmlns:constants="http://www.tuanzi.com/constants/tags"
                xmlns:security="http://www.springframework.org/security/tags"
                template="/templates/template.xhtml">
    <ui:define name="title">征信入口分时统计</ui:define>
    <ui:define name="content">

        <h:form>
            <p:defaultCommand target="search"/>
            <div class="topbar clearfix" style="background: -webkit-linear-gradient(top,#f6f7f9 0,#ebedf0 100%);">
                <p:toolbar>
                    <f:facet name="left">
                        <p:commandButton id="toggler" type="button" value="展示选择"
                                         style="width: auto;"
                                         icon="ui-icon-calculator"/>

                        <p:columnToggler datasource="PayRecordHourStatisticDataTable" trigger="toggler"/>
                    </f:facet>
                    <f:facet name="right">
                        <p:commandButton id="search" value="查询" icon="fa fa-search"
                                         rendered="#{payRecordHourStatisticBean.isNormal()}"
                                         update="@form"/>
                        <p:commandButton value="重置" icon="fa fa-refresh"
                                         rendered="#{payRecordHourStatisticBean.isNormal()}"
                                         actionListener="#{payRecordHourStatisticBean.onReset}"
                                         process="@this" update="@form"/>
                    </f:facet>
                </p:toolbar>
            </div>
            <div class="ui-fluid" style="padding-top: 30px;">
                <div class="ui-g">
                    <div class="ui-g-12">
                        <div class="card">
                            <h1>查询条件</h1>
                            <p:panelGrid columns="6" layout="grid"
                                         columnClasses="ui-grid-col-1,ui-grid-col-3"
                                         styleClass="ui-panelgrid-blank"
                                         style="border:0px none; background-color:transparent;text-align:center;">
                                <p:outputLabel for="payStatus" value="支付状态"/>
                                <p:selectOneMenu id="payStatus" value="#{payRecordHourStatisticBean.$.payState}">
                                    <f:selectItem itemLabel="- 请选择 -" itemValue="-1" noSelectionOption="true"/>
                                    <f:selectItems value="#{payRecordHourStatisticBean.orderStatus}"/>
                                </p:selectOneMenu>
                                <p:outputLabel for="startTime" value="开始时间"/>
                                <p:calendar id="startTime" value="#{payRecordHourStatisticBean.$.startTime}"
                                            locale="#{constants:get('LOCALE')}"
                                            timeZone="#{constants:get('TIME_ZONE')}"
                                            pattern="#{constants:get('DATETIME_FORMAT')}"/>
                                <p:outputLabel for="endTime" value="结束时间"/>
                                <p:calendar id="endTime" value="#{payRecordHourStatisticBean.$.endTime}"
                                            locale="#{constants:get('LOCALE')}"
                                            timeZone="#{constants:get('TIME_ZONE')}"
                                            pattern="#{constants:get('DATETIME_FORMAT')}"/>
                            </p:panelGrid>
                        </div>
                        <div class="card">
                            <p:dataTable id="PayRecordHourStatisticDataTable"
                                         style="width: 100%;text-align:center"
                                         var="PayRecordHourStatistic"
                                         value="#{payRecordHourStatisticBean.lazyDataModel}"
                                         rows="#{constants:get('ROWS')}"
                                         lazy="true"
                                         paginator="true"
                                         paginatorTemplate="#{constants:get('PAGINATOR_TEMPLATE')}"
                                         rowsPerPageTemplate="#{constants:get('ROWS_PER_PAGE_TEMPLATE')}"
                                         emptyMessage="#{constants:get('EMPTY_MESSAGE')}"
                                         scrollable="true"
                                         reflow="true"
                                         selection="#{payRecordHourStatisticBean.selectedRecords}"
                                         resizableColumns="true">
                                <p:column headerText="日期">
                                    <h:outputText value="#{PayRecordHourStatistic.date}"/>
                                </p:column>
                                <p:column headerText="入口位置" style="text-align:center;">
                                    <h:outputText value="#{PayRecordHourStatistic.entrance}"/>
                                </p:column>
                                <p:column headerText="0点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[0]}"/>
                                </p:column>
                                <p:column headerText="1点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[1]}"/>
                                </p:column>
                                <p:column headerText="2点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[2]}"/>
                                </p:column>
                                <p:column headerText="3点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[3]}"/>
                                </p:column>
                                <p:column headerText="4点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[4]}"/>
                                </p:column>
                                <p:column headerText="5点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[5]}"/>
                                </p:column>
                                <p:column headerText="6点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[6]}"/>
                                </p:column>
                                <p:column headerText="7点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[7]}"/>
                                </p:column>
                                <p:column headerText="8点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[8]}"/>
                                </p:column>
                                <p:column headerText="9点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[9]}"/>
                                </p:column>
                                <p:column headerText="10点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[10]}"/>
                                </p:column>
                                <p:column headerText="11点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[11]}"/>
                                </p:column>
                                <p:column headerText="12点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[12]}"/>
                                </p:column>
                                <p:column headerText="13点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[13]}"/>
                                </p:column>
                                <p:column headerText="14点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[14]}"/>
                                </p:column>
                                <p:column headerText="15点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[15]}"/>
                                </p:column>
                                <p:column headerText="16点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[16]}"/>
                                </p:column>
                                <p:column headerText="17点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[17]}"/>
                                </p:column>
                                <p:column headerText="18点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[18]}"/>
                                </p:column>
                                <p:column headerText="19点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[19]}"/>
                                </p:column>
                                <p:column headerText="20点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[20]}"/>
                                </p:column>
                                <p:column headerText="21点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[21]}"/>
                                </p:column>
                                <p:column headerText="22点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[22]}"/>
                                </p:column>
                                <p:column headerText="23点" style="width:25px">
                                    <h:outputText value="#{PayRecordHourStatistic.hourCountArray[23]}"/>
                                </p:column>

                            </p:dataTable>
                        </div>
                    </div>
                </div>
            </div>
        </h:form>
    </ui:define>
</ui:composition>
